import moment from 'moment';

export const searchProps1 = [
  {
    type: 'input',
    value: 'keywords',
    name: '任务名称',
    style: {
      width: '300px',
    },
    placeholder: '请输入你想搜索的任务',
  },
  {
    type: 'inputUnit',
    value: 'min_promotion_money_rate',
    name: '保比值范围',
    style: {
      width: '100px',
    },
    placeholder: '请输入',
  },
  {
    type: 'inputUnit',
    value: 'max_promotion_money_rate',
    name: '~',
    style: {
      width: '100px',
    },
    placeholder: '请输入',
  },
  {
    type: 'select_input_one',
    value: 'hot_sort',
    name: '任务热度',
    selectOptions: [
      {
        value: 'desc',
        label: '由高到低',
      },
      {
        value: 'asc',
        label: '由低到高',
      },
    ],
    placeholder: '请选择',
    style: {
      width: '180px',
    },
  },
  {
    type: 'select_input_one',
    value: 'pay_sort',
    name: '爆单任务',
    selectOptions: [
      {
        value: 'desc',
        label: '由高到低',
      },
      {
        value: 'asc',
        label: '由低到高',
      },
    ],
    placeholder: '请选择',
    style: {
      width: '180px',
    },
  },
  {
    type: 'date3',
    value: 'time',
    name: '发布时间',
    selectOptions: [],
    placeholder: '请选择',
    style: {
      width: '240px',
    },
  },
];
export const searchProps2 = [
  {
    type: 'input',
    value: 'ks_user',
    name: '达人信息',
    style: {
      width: '300px',
    },
    placeholder: '请输入您想查询的达人',
  },
];
export const searchProps3 = [
  {
    type: 'select_input_one',
    value: 'channelId',
    name: '渠道',
    selectOptions: [],
    placeholder: '请选择',
    style: {
      width: '180px',
    },
  },
  {
    type: 'select_input_three',
    value: 'institutionId',
    name: '机构名称',
    selectOptions: [],
    placeholder: '请选择',
    style: {
      width: '180px',
    },
  },

  {
    type: 'input',
    value: 'phone',
    name: '手机号',
    style: {
      width: '180px',
    },
    placeholder: '请输入',
  },
  {
    type: 'date3',
    value: 'time',
    name: '日期',
    selectOptions: [],
    placeholder: '请选择',
    style: {
      width: '240px',
    },
  },
];

export const columns1 = [

  {
    dataIndex: 'statisticsDate',
    title: '统计时间',
    ellipsis: true,
    width: 150,
    customRender: (text) => text ? moment(text).format('YYYY-MM-DD') : '/',
  },

  {
    dataIndex: 'channelName',
    title: '渠道名称',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'channelUv',
    title: 'UV',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'institutionApply',
    title: '机构进件数量',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'loanClickNumber',
    title: '唯一点击',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'registerNumber',
    title: '渠道注册数',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'percentage',
    title: '注册百分比',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },

 
  {
    dataIndex: 'submitFormNumber',
    title: '完件数',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'complete',
    title: '完件百分比',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
];

const typeMap = {
  0: '否',
  1: '是',
};



export const columns2 = [
  {
    dataIndex: 'logo',
    title: '达人信息',
    ellipsis: true,
    width: 300,
    scopedSlots: { customRender: 'logo' },
  },
  {
    dataIndex: 'performance',
    title: '申样交付率',
    ellipsis: true,
    width: 300,
    scopedSlots: { customRender: 'performance' },
  },
  {
    dataIndex: 'task_status',
    title: '地址管理',
    ellipsis: true,
    width: 150,
    scopedSlots: { customRender: 'task_status' },
  },
  {
    dataIndex: 'operate',
    title: '操作',
    ellipsis: true,
    width: 150,
    scopedSlots: { customRender: 'operate' },
  },
  // {
  //   dataIndex: 'time',
  //   title: '推送时间',
  //   ellipsis: true,
  //   width: 150,
  //   customRender: (text) => text || '/',
  // },

];
export const columns3 = [

 

  {
    dataIndex: 'phone',
    title: '手机号',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'channelName',
    title: '渠道名称',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'productName',
    title: '机构名称',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'productPrice',
    title: '产品价格',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'cityName',
    title: '城市名称',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
  {
    dataIndex: 'time',
    title: '推送时间',
    ellipsis: true,
    width: 150,
    customRender: (text) => text || '/',
  },
];
